#ifndef SIEVE_H
#define SIEVE_H

/*
 * Runs the sieve of Eratosthenes up to n. Call this before calling prime(i).
 */
void sieve_init(int n);

/*
 * Frees the resources associated with the sieve. Call this before exiting the
 * program.
 */
void sieve_finalize();

/*
 * Returns whether i is prime.
 */
int is_prime(int i);

#endif /* SIEVE_H */
